<?php 
//define('DS', DIRECTORY_SEPARATOR);
//define('ROOT', dirname(dirname(__FILE__)));
//
//
////require_once('lib/config.php') ;


?>
<?php include 'Memela/layout.php'; ?>

<?php

//call a router class





//$pageContent = file_get_contents($url);
//if request 
//switch to the controller with default
//include view in controller
?>




<?php 


//The switch statement
$url = substr($_SERVER['REQUEST_URI'], strlen(URLROOT));
 

switch($url){	
       case ('/'):
		require_once('controller/IndexController.php');	
	break;
	case ('/foo/'):
		require_once('controller/foo.php');
                $controller = new App_Controller_Foo();
                $controller->invoke();
	break;
	case ('/bar/'):
		require_once('controller/bar.php');
	break;
	default:
		//the default is an error!
		require_once('navbar.php');
                
	break;
}

;?>
<?php //Memela_Layout::standardLayout(); ?>
<?php //Memela_Layout::footer() ?>

